Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

deConnectionBin.hpp

Go to the documentation of this file.
00001 ///////////////////////////////////////////////////////////////////////////////
00002 /// @file deConnectionBin.hpp
00003 ///
00004 /// @brief 
00005 ///
00006 /// @author trajar
00007 ///
00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
00009 /// contents of this file is subject to the Destiny3D Member License which
00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
00011 ///
00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
00014 /// for any particular purpose.
00015 ///
00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
00017 ///
00018 /// <hr>
00019 ///                                 Change History
00020 /// <hr>
00021 ///
00022 /// @date Jun 2002
00023 /// @author trajar
00024 /// @remarks Creation
00025 ///
00026 ///////////////////////////////////////////////////////////////////////////////
00027 
00028 #ifndef _DECONNECTIONBIN_HPP
00029 #define _DECONNECTIONBIN_HPP
00030 
00031 #ifndef     _DENET_HPP
00032  #include   "deNet.hpp"
00033 #endif
00034 
00035 #ifndef     _DESYNCHOBJECT_HPP
00036  #include   "deSynchObject.hpp"
00037 #endif
00038 
00039 #include    <WINDOWS.H>
00040 
00041 #include    <VECTOR>
00042 
00043 class deThread;
00044 class deConnection;
00045 typedef std::vector< deConnection* > aConnections;
00046 typedef std::vector< bool > aBools;
00047 
00048 class DENET_API deConnectionBin
00049 {
00050 public:
00051     deConnectionBin(void);
00052     virtual ~deConnectionBin(void);
00053 
00054     eNetError           AddConnection( deConnection * pConn );
00055     eNetError           RemoveConnection( deConnection * pConn );
00056 
00057     HANDLE              GetNewConnectionEvent( void );
00058     DWORD               GetNumConnections( void );
00059     deConnection *      GetConnectionAt( DWORD pIndex );
00060     deSynchObject *     GetSynchObject(void);
00061     void                SetConnectionActivated( DWORD pIndex, bool pValue );
00062     bool                IsConnectionActivated( DWORD pIndex );
00063     bool                IsEmpty( void ) ;
00064     bool                IsRunning( void );
00065     
00066     eNetError           Run( void );
00067     void                Stop( void );
00068     virtual eNetError   OnWorkerThread( deConnectionBin * pBin )    = 0;
00069 
00070     static void         SetMaxConnections( DWORD pNum );
00071     static DWORD        GetNumMaxConnections(void);
00072 
00073 private:
00074 
00075     deThread *      m_ServiceThread;
00076     bool            m_bIsRunning;
00077     DWORD           m_iNumConnections;
00078     aConnections    m_aConnections;
00079     aBools          m_aConnectionsActivated;
00080     deSynchObject   m_SynchObject;
00081     HANDLE          m_NewConnectionEvent;
00082 
00083     static DWORD    m_iNumMaxConnections;
00084 };
00085 
00086 #endif

Generated on Mon Sep 12 19:58:25 2005 for Destiny3D by doxygen1.3-rc3